{% extends "zylinder_app/skel.html" %}
{% load static %}

{% block addCSS %}
<link rel="stylesheet" href="{% static 'zylinder_app/style.css' %}">
{% endblock %}

{% block body %}
<p>Hello, {{ user.get_username }}! Set up your game.</p>
<form action="{% url 'zylinder_app:newPlayer' %}" method="post">
    {% csrf_token %}
    {{ form }}
    <input type="submit" value="Submit">
</form>
{% if form.errors %}
    {% for field in form %}
        {% for error in field.errors %}
            <div class="alert alert-danger">
                <strong>{{ error|escape }}</strong>
            </div>
        {% endfor %}
    {% endfor %}
    {% for error in form.non_field_errors %}
        <div class="alert alert-danger">
            <strong>{{ error|escape }}</strong>
        </div>
    {% endfor %}
{% endif %}
{% endblock %}

{% block addJS %}
{% endblock %}
